package demo1;

public class BookList {
    private Book[] books=new Book[10];
    private int useSize;

    public BookList(){
        this.books[0]=new Book("三国演义","罗贯中",100,"小说");
        this.books[1]=new Book("红楼梦","曹雪芹",90,"小说");
        this.books[2]=new Book("西游记","吴承恩",80,"小说");

        useSize=3;
    }
    public int getUseSize(){
        return useSize;
    }
    public void setUseSize(int useSize){
        this.useSize=useSize;
    }
public Book[] getBook(){
        return books;
}
    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(int pos,Book books) {
        this.books [pos]= books;
    }
}
